#!/bin/sh

killall -c HWPortCfg
sudo cp -f "$1/Contents/Resources/config" "/Library/StartupItems/HWPortDetect/"
sudo chmod -Rf 755 /Library/StartupItems/HWPortDetect
sudo chown -R root:wheel /Library/StartupItems/HWPortDetect

sudo cp -f "$1/Contents/Resources/HWPortCfg.plist" "/Library/LaunchAgents/"
sudo chmod -Rf 644 /Library/LaunchAgents/HWPortCfg.plist
sudo chown -R root:wheel /Library/LaunchAgents/HWPortCfg.plist
echo "ok--kuai003"

